<div class="chapter" id="chapter.BasicAPI"
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:xi="http://www.w3.org/2001/XInclude">

    <div class="title">The Cling Core API</div>
    <div class="content">

        <p>
            The programming interface of Cling is fundamentally the same for UPnP clients and servers. The single
            entry point for any program is the <code>UpnpService</code> instance. Through this API you access
            the local UPnP stack, and either execute operations as a client (control point) or provide services
            to local or remote clients through the registry.
        </p>

        <p>
            The following diagram shows the most important interfaces of Cling Core:
        </p>

        <img src="img/api_overview.png" alt="API Overview" style="display:block; margin-left: auto; margin-right:auto;"/>

        <p>
            You'll be calling these interfaces to work with UPnP devices and interact with UPnP services. Cling
            provides a fine-grained meta-model representing these artifacts:
        </p>

        <img src="img/metamodel_overview.png" alt="Metamodel Overview" style="display:block; margin-left: auto; margin-right:auto;"/>

        <p>
            In this chapter we'll walk through the API and metamodel in more detail, starting with the <code>UpnpService</code>.
        </p>

        <xi:include href="upnpservice.xhtml"/>

        <xi:include href="controlpoint.xhtml"/>

        <xi:include href="registry.xhtml"/>

    </div>
</div>
